<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    //文档输出内容
    document.write('<h1>你好！</h1>')
    //控制台输出
    console.log("你好！");
    //输出内容
    var a = prompt('你好！')
    console.log(a);
  </script>
</body>

</html>